<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <base href="<%=basePath%>"/>
    
 <title>当当网商品展示页面</title>
<link href="css/global.css" rel="stylesheet" type="text/css" />
<link href="css/layout.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.4.3.js"></script>
<script type="text/javascript" src="js/orderProduct.js"></script>
<script type="text/javascript" src="js/login.js"></script>
<style>
#buyinfo{
float:right;
font-size:14px;
color:red;
position:relative;
top:-20px
}
   .direction{
   position:absolute;
   top:100px;
   left:400px;
   }
</style>
<%
	
%>
</head>

<body>
<div id="header"><iframe src="common/header.jsp" height="250px" width="960px" frameborder="0"></iframe></div>
<!--中间部分开始-->
<div id="main">
  <div class="current_place">您现在的位置：<a href="mainAction">当当图书</a> >> <s:property value="#session.nowPosition"/></div>
  <!--左侧菜单开始-->
  <div id="product_left">
  <div id="product_catList">
   <div class="product_catList_top">浏览同级分类</div>
<%--   <div id="product_catList_class"><!--使用javaScript显示图书分类--></div>--%>
<!-- 显示同级分类开始 -->
   <div>
   		<ul>
	   <s:iterator value="#session.categoryList">
   			<li style="position:relative;left:20px;"><a href="mainAction!productShow?category.id=<s:property value="id"/>&category.parentId=<s:property value="parentId"/>">
   			<s:property value="name"/>(<s:property value="countProduct" />)</a></li>
   	  </s:iterator>
   		</ul>
   </div>
   <!-- 显示同级分类结束 -->
   </div>
  <div class="product_catList_end">
  <img src="images/product_01.gif" alt="shopping"/>
  <img src="images/product_02.gif" alt="shopping"/>
  </div>
  </div>
  <!--右侧内容开始-->
  <div id="product_storyList">
   <div id="product_storyList_top">
      <ul>
         <li>排序方式</li>
         <li><img src="images/dd_arrow_right.gif" alt="arrow"/></li>
         <li>
         <select id="compositor" style="font-size:12px;">
           <option value="0">按价格 升序</option>
           <option value="1">按价格 降序</option>
           <option value="2">按折扣 升序</option>
           <option value="3">按折扣 降序</option>
           <option value="4">按出版时间 升序</option>
           <option value="5">按出版时间 降序</option>
           <option value="6">按上架时间 升序</option>
           <option value="7">按上架时间 降序</option>
         </select>
         </li>
         <li><img src="images/product_icon_01.gif" alt="icon"/></li>
         <li><img src="images/product_icon_02.gif" alt="icon"/></li>
         <li><img src="images/product_icon_03.gif" alt="icon"/></li>
         <li><img src="images/product_icon_04.gif" alt="icon"/></li>
         <li>每页显示的数量</li>
         <li><img src="images/dd_arrow_right.gif" alt="arrow"/></li>
         <li><img src="images/product_icon_20.gif" alt="icon"/></li>
         <li><img src="images/product_icon_40.gif" alt="icon"/></li>
<%--上一页下一页--%>
         <li style="float:right; padding-right:10px;">
         <s:if test="#session.pageNo < #session.pageCount">
       	 	<a href="mainAction!productShow?pageNo=<s:property value='#session.pageNo+1'/>&category.id=<s:property value='#session.category.id'/>&category.parentId=<s:property value='#session.category.parentId'/>"> <img src="images/product_page_down.gif" alt="icon"/></a>
         </s:if>
         <s:else>
        	<img src="images/page_down.gif" alt="icon"/> 
         </s:else>
          </li>
         
         <li style="float:right;">第<s:property value="#session.pageNo"/>页/共<s:property value="#session.pageCount"/>页</li>
         <li style="float:right;">
         <s:if test="#session.pageNo>1">
         	 <a href="mainAction!productShow?pageNo=<s:property value='#session.pageNo-1'/>&category.id=<s:property value='#session.category.id'/>&category.parentId=<s:property value='#session.category.parentId'/>"><img src="images/page_up.gif" alt="icon"/></a>
         </s:if>
         <s:else>
       		 <img src="images/product_page_up.gif" alt="icon"/>
         </s:else>
       	   </li>
      </ul>
      </div>
 <!--图书排列开始-->
   <div class="product_storyList_content">
<%--   <div id="storyBooksssss"><!--使用javaScript显示图书列表--></div>--%>
   <!--列表开始-->
   <s:iterator value="#session.bookList">
         <div class="product_storyList_content_left">
         <a href="mainAction!bookInfo?book.id=${id }"><img style="width:76px;height:109px;" src="productImages/<s:property value="productPic"/>" alt="图书列表"/></a></div>
         <div class="product_storyList_content_right">
            <ul>
              <li class="product_storyList_content_dash"><a href="mainAction!bookInfo?book.id=${id }" class="blue_14"><s:property value="productName"/></a></li>
              <li>顾客评分：<img src="images/star_red.gif" alt="star"/><img src="images/star_red.gif" alt="star"/><img src="images/star_red.gif" alt="star"/><img src="images/star_red.gif" alt="star"/><img src="images/star_gray.gif" alt="star"/></li>
              <li>作　者：<a href="#" class="blue_14"><s:property value="author"/></a> 著</li>
              <li>出版社：<a href="#" class="blue_14"><s:property value="publishing"/></a></li>
              <li>出版时间：<s:date name="publishTime" format="yyyy年MM月dd日"/></li>
              <li><s:property value="description"/><span id="buyinfo"><s:property value="#session.buyInfo"/></span></li> 
              <li>
              <dl class="product_content_dd">
<!--放入暂存  --><dd><a href="#"><img src="images/product_buy_02.gif" alt="shopping"/></a></dd>
<!-- 购买 -->  <dd><a href="javascript:;" onclick="tanLogin(${id});"><img src="images/product_buy_01.gif" alt="shopping"/></a></dd>
              <dd>节省：￥<s:property value="fixedPrice-dangPrice"/></dd>
              <dd>折扣：<s:property value="(dangPrice/fixedPrice)*100"/>折</dd>
              <dd class="footer_dull_red">￥<s:property value="dangPrice"/></dd>
               <dd class="product_content_delete">￥<s:property value="fixedPrice"/></dd>
              </dl>
              　</li>
              </ul>
            </div>
       <div class="product_storyList_content_bottom"></div>
   </s:iterator>
   <div>
       <dl class="product_content_dd">
       <dd><img src="images/OK.gif" alt="ok"/></dd>
       <dd>页</dd>
       <dd><input name="page" type="text" value="<s:property value='#session.pageNo'/>" style="width:20px;"/></dd>
       <dd>跳转到第</dd>
       <dd><a href="mainAction!productShow?pageNo=<s:property value='#session.pageNo+1'/>&category.id=<s:property value='#session.category.id'/>&category.parentId=<s:property value='#session.category.parentId'/>"><img src="images/next.gif" alt="ok"/></a></dd>
       <dd><ul id="product_page">
         <li><a href="#" class="product_page">1</a></li>
         <li><a href="#" class="product_page">2</a></li>
         <li> <a href="#" class="product_page">3</a></li>
         <li> ...</li>
         <li><a href="#" class="product_page">14</a></li>
         <li><a href="#" class="product_page">15</a></li>
         <li><a href="#" class="product_page">16</a></li>
         </ul>
         </dd>
       <dd><img src="images/product_page_up.gif" alt="ok"/></dd>
       </dl>
   </div>
   </div>
  </div>
  <!--右侧内容结束-->
  <script src="js/product.js" type="text/javascript"></script>
</div>
<!--网站版权部分开始-->
<div id="footer">
<div class="footer_top"><a href="#" target="_parent" class="footer_dull_red">公司简介</a> | <a href="#" target="_parent" class="footer_dull_red">诚证英才</a> | <a href="#" target="_parent" class="footer_dull_red">网站联盟</a> | <a href="#" target="_parent" class="footer_dull_red">百货招商</a> | <a href="#" target="_parent" class="footer_dull_red">交易条款</a></div>
<iframe src="common/footer.jsp" height="50px" width="900px" frameborder="0"></iframe></div>
<%--点击购买按钮如果没有购买,弹出此窗口,让用户登录--%>

 
<div id="tanLogin" style="display:none;border:1px solid silver;position:absolute;top:100px;left:400px;width:400px;height:300px;background-color:white;">
    <div class="login_content_top">请登录当当网</div>
    <div class="login_content_line"></div>
    <s:form action="userAction!doLogin" onsubmit="return checkLogin();" theme="simple" method="post" namespace="user">
    <dl class="login_content">
       <dt>邮箱：</dt>
       <dd><s:textfield id="email" cssClass="login_content_input" onfocus="emailFocus()" onblur="emailBlur()" name="user.email"/></dd>
    </dl>
     <dl class="login_content">
       <dt>密码：</dt>
       <dd><s:password id="pwd" cssClass="login_content_input" onfocus="pwdFocus()" onblur="pwdBlur()" name="user.password"/></dd>
    </dl>
     <dl class="login_content">
       <dt></dt>
       <dd><s:submit value="" id="btn" cssClass="login_btn_out"  onmouseover="this.className='login_btn_over'"  onmouseout="this.className='login_btn_out'"/></dd>
    </dl>
    </s:form>
    <div class="login_content_dotted"></div>
    <div class="login_content_end_bg">
     <div class="login_content_end_bg_top">
    <label class="login_content_bold">还不是当当网用户？</label>快捷方便的免费注册，让你立刻尽享当当网提供的条项优惠服务......
     </div>
     <div class="login_content_end_bg_end">
     <input  class="login_register_out" value=" " type="button" onmouseover="this.className='login_register_over'"  onmouseout="this.className='login_register_out'" onclick="jump()"/>
      </div>
    </div>
    </div>
</body>

</html>

